package cn.lg.soar.flow.biz.entity;

import cn.lg.soar.database.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Set;

/**
 * 流程审批人
 * @author luguoxiang
 * @since 2025-08-02
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@Schema(description = "流程审批人")
@TableName(value = "lg_flow_approver", autoResultMap = true)
public class SoarApprover extends BaseEntity {

    /** 主键 */
    @TableId
    private Long id;

    /** 流程实例id */
    private String procInstId;

    /** 节点key */
    private String nodeKey;

    /** 审批人 */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Set<String> approvers;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
